﻿#pragma warning disable 649    // disable compiler warnings about unassigned fields

namespace QuizSilverlight.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Linq;
    using System.Linq;
    using System.Web.DomainServices;
    using System.Web.Ria;
    using System.Web.Ria.Services;


    // The MetadataTypeAttribute identifies AnswerMetadata as the class
    // that carries additional metadata for the Answer class.
    [MetadataTypeAttribute(typeof(Answer.AnswerMetadata))]
    public partial class Answer
    {

        // This class allows you to attach custom attributes to properties
        // of the Answer class.
        //
        // For example, the following marks the Xyz property as a
        // required field and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz;
        internal sealed class AnswerMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private AnswerMetadata()
            {
            }

            public string Body;

            public int Id_Answer;

            public int Id_Question;

            public bool IsValid;

            public Question Question;
        }
    }

    // The MetadataTypeAttribute identifies ParticipantMetadata as the class
    // that carries additional metadata for the Participant class.
    [MetadataTypeAttribute(typeof(Participant.ParticipantMetadata))]
    public partial class Participant
    {

        // This class allows you to attach custom attributes to properties
        // of the Participant class.
        //
        // For example, the following marks the Xyz property as a
        // required field and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz;
        internal sealed class ParticipantMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ParticipantMetadata()
            {
            }
            [Required]
            [Display(Name = "First Name", Description = "Votre prénom", GroupName = "Name")]
            public string FirstName;

            public int Id_Participant;

            public int Id_WebSite;

            [Required]
            [Display(Name = "Last Name", Description = "Votre nom", GroupName = "Name")]
            public string LastName;

            [Required]
            [Display(Name = "Phone", Description = "Numéro de téléphone de la forme ## ### ###")]
            [RegularExpression(@"^\d\d\ \d\d\d\ \d\d\d$", ErrorMessage = "Le numéro de téléphone n'est pas valide.  Veuillez entrer un numéro de téléphone de la forme suivante ## ### ###")]
            public string Phone;

            public WebSite WebSite;
        }
    }

    // The MetadataTypeAttribute identifies QuestionMetadata as the class
    // that carries additional metadata for the Question class.
    [MetadataTypeAttribute(typeof(Question.QuestionMetadata))]
    public partial class Question
    {

        // This class allows you to attach custom attributes to properties
        // of the Question class.
        //
        // For example, the following marks the Xyz property as a
        // required field and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz;
        internal sealed class QuestionMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private QuestionMetadata()
            {
            }

            public EntitySet<Answer> Answer;

            public string Body;

            public int Id_Question;

            public int Id_WebSite;

            public WebSite WebSite;
        }
    }

    // The MetadataTypeAttribute identifies WebSiteMetadata as the class
    // that carries additional metadata for the WebSite class.
    [MetadataTypeAttribute(typeof(WebSite.WebSiteMetadata))]
    public partial class WebSite
    {

        // This class allows you to attach custom attributes to properties
        // of the WebSite class.
        //
        // For example, the following marks the Xyz property as a
        // required field and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz;
        internal sealed class WebSiteMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private WebSiteMetadata()
            {
            }

            public int Id_WebSite;

            public string Name_Site;

            public EntitySet<Participant> Participant;

            public EntitySet<Question> Question;
        }
    }
}

#pragma warning restore 649    // re-enable compiler warnings about unassigned fields
